﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true"
    CodeBehind="TopList.aspx.cs" Inherits="MLM.AdminCP.Pages.TopListmissing" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div id="divData">
    </div>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
           
                        $(function () {
              
                    $.ajax({
                        type: "POST",
                        url: "/AdminCP/Pages/TopList.aspx/GetData",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        async: true,
                        success: function (msj) {
                            msj.d = JSON.parse(msj.d);
                          
                            if (msj.d.length > 0) {
                                $('#divData').highcharts({
                                    chart: {
                                        type: 'column'
                                    },
                                    title: {
                                        text: 'Top list '
                                    },
                                    subtitle: {
                                },
                                credits: { enabled: false },
                                xAxis: {
                                    categories: msj.d[0].ProductName
                                },
                                yAxis: {
                                    min: 0,
                                    title: {
                                        text: 'Quantity'
                                    }
                                },
                                tooltip: {
                                    headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                                    pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                    '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
                                    footerFormat: '</table>',
                                    shared: true,
                                    useHTML: true
                                },
                                plotOptions: {
                                    column: {
                                        pointPadding: 0.2,
                                        borderWidth: 0
                            }
                                },
                                series: [{
                                    name: 'Quantity',
                                    data: msj.d[0].CountProduct
                                }]
                            });
                        }
                    }
           
          
            });
        });    
        </script>
    </telerik:RadCodeBlock>
</asp:Content>
